import Vue from 'vue'
import Router from 'vue-router'
import login from "@/components/login/login"
import admin from "@/components/admin/admin"
import home from "@/components/admin/home/home"
import pcsygg from "@/components/admin/gggl/PCsygg"
import ptyh from "@/components/admin/yhgl/ptyh"
import zbfdw from "@/components/admin/yhgl/zbfdw"
import hdgl from "@/components/admin/hdgl/hdgl"
import hdlx from "@/components/admin/hdgl/hdlx"
import ydsygg from "@/components/admin/gggl/ydsygg"
import jsgl from "@/components/admin/glygl/jsgl"
import glyyh from "@/components/admin/glygl/glyyh"
import bzzx from "@/components/admin/xtgly/bzzx"
import gywm from "@/components/admin/xtgly/gywm"
import yjfk from "@/components/admin/xtgly/yjfk"
import hdxq from "@/components/admin/hdgl/hdxq"

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/admin',
      name: 'admin',
      component: admin,
      redirect: "/admin/home",  //默认打开第一个子路由
      children:[
        {
          path: 'home',
          name: 'home',
          component: home
        },
        {
          path: 'ptyh',
          name: 'ptyh',
          component: ptyh
        },
        {
          path: 'zbfdw',
          name: 'zbfdw',
          component: zbfdw
        },
        {
          path: 'hdgl',
          name: 'hdgl',
          component: hdgl
        },
        {
          path: 'hdxq',
          name: 'hdxq',
          component: hdxq
        },
        {
          path: 'hdlx',
          name: 'hdlx',
          component: hdlx
        },
        {
          path: 'pcsygg',
          name: 'pcsygg',
          component: pcsygg
        },
        {
          path: 'ydsygg',
          name: 'ydsygg',
          component: ydsygg
        },
        {
          path: 'jsgl',
          name: 'jsgl',
          component: jsgl
        },
        {
          path: 'glyyh',
          name: 'glyyh',
          component: glyyh
        },
        {
          path: 'gywm',
          name: 'gywm',
          component: gywm
        },
        {
          path: 'yjfk',
          name: 'yjfk',
          component: yjfk
        },
        {
          path: 'bzzx',
          name: 'bzzx',
          component: bzzx
        }
      ]
    }
  ]
})
